home *** CD-ROM | disk | FTP | other *** search
- /*
- File: TrueTypeLibrary.h
-
- Contains: TrueType library definitions and routines
-
- Written By: Mike Reed
-
- Copyright: ©1992-1995 by Apple Computer, Inc. All rights reserved.
-
- Change History (most recent first):
-
- <1> 1/9/95 JD First checked in.
-
- */
-
- #ifndef __TRUETYPELIBRARY__
- #define __TRUETYPELIBRARY__
-
- #include <GXMath.h>
- #include <GXTypes.h>
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- /* for compatibility with old headers */
- #define truetypeLibraryIncludes
-
- #define fontHeaderTag 0x68656164 /* 'head' */
- #define horizontalHeaderTag 0x68686561 /* 'hhea' */
- #define indexToLocationTag 0x6c6f6361 /* 'loca' */
- #define maximumProfileTag 0x6d617870 /* 'maxp' */
- #define controlValueTag 0x63767420 /* 'cvt ' */
- #define preProgramTag 0x70726570 /* 'prep' */
- #define glyphDataTag 0x676c7966 /* 'glyf' */
- #define horizontalMetricsTag 0x686d7478 /* 'hmtx' */
- #define verticalMetricsTag 0x766d7478 /* 'vmtx' */
- #define fontProgramTag 0x6670676d /* 'fpgm' */
- #define bitmapLocationTag 0x626c6f63 /* 'bloc' */
- #define bitmapDataTag 0x62646174 /* 'bdat' */
- #define glyphVariationTag 0x67766172 /* 'gvar' */
- #define cvtVariationTag 0x63766172 /* 'cvar' */
- #define accentAttachmentTag 0x61636e74 /* 'acnt' */
- #define postscriptGlyphNameTag 0x706f7374 /* 'post' */
- #define verticalHeaderTag 0x76686561 /* 'vhea' */
-
- struct glyphBoundingBox {
- short xMin;
- short yMin;
- short xMax;
- short yMax;
- };
-
- typedef struct glyphBoundingBox glyphBoundingBox;
-
- void ComputeGlyphBBox(register glyphBoundingBox* bbox, const short xArray[], const short yArray[], int counter);
- long GetFontGlyphData(gxFont fontID, long index, void* userCopy);
- void SetFontGlyphData(gxFont fontID, long index, long length, void* data);
- void SetFontGlyphShape(gxFont fontID, long glyphIndex, gxShape pathOrPolygon);
-
- /* These are experimental */
- long GetFontGlyphOutline(gxFont fontID, long glyphIndex, short* contourCount, short endPoint[], unsigned char onCurve[],
- short xCoord[], short yCoord[], short* instructionCount, unsigned char instructions[], glyphBoundingBox* bbox);
- void SetFontGlyphOutline(gxFont fontID, long glyphIndex, long contourCount, const short endPoint[], const unsigned char onCurve[],
- const short xCoord[], const short yCoord[], long instructionCount, const unsigned char instructions[], const glyphBoundingBox* bbox);
-
- #ifdef __cplusplus
- }
- #endif
-
- #endif /* __TRUETYPELIBRARY__ */
-
-